using System;
using System.Collections.Generic;
using Com.ContentRendering.Api.RenderEngine.Exceptions;

namespace Com.ContentRendering.Api.RenderEngine.Resolver
{
    /// <summary/>
    internal class LeafResolver : AbstractResolver
    {
        private string _value;

        /// <summary/>
        internal LeafResolver(string value)
        {
            this._value = value;
        }

        /// <summary/>
        internal override bool IsParent()
        {
            return false;
        }

        /// <summary/>
        internal override IEnumerator<AbstractResolver> Children
        {
            get { throw new ResolverIsNotParentException(); }
        }

        /// <summary/>
        internal override string Value
        {
            get { return this._value; }
        }
    }
}
